import React, { memo, useEffect } from 'react'
import type { ReactNode } from 'react'
import { LoginWrapper } from './style'
import { useAppSelector } from '@/store'



interface IProps {
  children?: ReactNode
}

const Login: React.FC<IProps> = () => {
  const {loginQRCode} = useAppSelector((state) => ({
    loginQRCode: state.login.loginQRCode
  }))
  console.log(loginQRCode, 'loginQRCode');
  

  return (
    <LoginWrapper>
      {loginQRCode && <img className='qrcode' src={loginQRCode} alt="" />}
      <div className="tips">
        <div>使用 <span className='title'>网易云音乐app</span> 扫描登录</div>
      </div>
    </LoginWrapper>
  )
}

export default memo(Login)
